package dome2;

class Rectangle extends Shape {
    double width;
    double height;

    public Rectangle(double width, double height) {
        this.width = width;
        this.height = height;
    }

    // 重写父类方法
    @Override
    public double getArea() {
        return width * height;
    }
}

